﻿using Microsoft.SqlServer.Server;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Learun.Application.TwoDevelopment.ZZDT_EC
{
    public class ec_projectSettingsBLL
    {
        private ec_projectSettingsService ec_projectSettingsService = new ec_projectSettingsService();

        public IEnumerable<ec_projectSettingsEntity> GetList( string projId)
        {
            var res = ec_projectSettingsService.GetList(projId); 
            return res;
        }

        public ec_projectSettingsEntity GetEntity(string settingName, string projId)
        {
            var res = ec_projectSettingsService.GetList(projId);
            var res2 = res.FirstOrDefault(x => x.SettingName == settingName);
            return res2;
        }

        public void SaveEntity( ec_projectSettingsEntity entity, string projId)
        {
            ec_projectSettingsService.SaveEntity( entity, projId);
        }

        public void DeleteEntity(string keyValue, string projId)
        {
            ec_projectSettingsService.DeleteEntity(keyValue, projId);
        }
    }
}
